using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using IMAPIWrapper;

namespace Ember
{
    public partial class Ember : Form
    {
        public Ember()
        {
            InitializeComponent();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutBox about = new AboutBox();
            about.ShowDialog();
        }
        private List<DiscRecorder> Recorders;
        private void Ember_Load(object sender, EventArgs e)
        {
            Recorders = new List<DiscRecorder>();
            DiscMaster dm = new DiscMaster();
            foreach (string id in dm)
            {
                DiscRecorder recorder = new DiscRecorder();
                try
                {
                    recorder.InitializeDiscRecorder(id);
                }
                catch (InvalidOperationException)
                {
                    continue;
                }
                Recorders.Add(recorder);
            }
        }

        private void EjectBtn_Click(object sender, EventArgs e)
        {
            Recorders[0].EjectMedia();
        }

        private void burnISOFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ISOBurn isob = new ISOBurn();
            isob.ShowDialog();
        }
    }
}